package com.bdqn.t320.util;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

@WebFilter(filterName = "EncodeFilter2",urlPatterns = "/*")
public class EncodeFilter2 implements Filter {
    public void destroy() {
        System.out.println("EncodeFilter2 销毁");
    }

    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException {
        System.out.println("EncodeFilter2...doFilter..begin");
        chain.doFilter(req, resp);
        System.out.println("EncodeFilter2...doFilter..end");
    }

    public void init(FilterConfig config) throws ServletException {
        System.out.println("EncodeFilter2 初始化");
    }

}
